<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex skillExplanat_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between skillExplanat_fd0_0'>
					<view class='flex flex-wrap align-center skillExplanat_fd0_0_c0' @tap="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  skillExplanat_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='skillExplanat_fd0_0_c1_c0'>课程章节</text>
					</view>
					<view class='flex align-center justify-end skillExplanat_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-wrap align-center justify-between benben-flex-layout skillExplanat_flex_1">
				<template v-for='(item,key0) in courseChapter'>
					<view class='flex flex-direction align-stretch skillExplanat_fd1_0' @tap.stop="handleJumpDiy"
						data-type="navigateTo"
						:data-url="`/pages/wode/skillDetails/skillDetails?freexuexirenwu_id=${freexuexirenwu_id}&freexianshangkecheng_id=${freexianshangkecheng_id}&id=${item.aid}`"
						:key='key0'>
						<image class='skillExplanat_fd1_0_c0' mode="aspectFill" :src='item.shipin.thumb'></image>
						<image class='skillExplanat_fd1_0_c1' mode="aspectFit" :src='STATIC_URL+"32.png"'></image>
						<view class='flex flex-wrap align-center skillExplanat_fd1_0_c2'>
							<text class='flex-sub skillExplanat_fd1_0_c2_c0'>{{item.wenben}}</text>
						</view>
						<view class='flex flex-wrap align-center skillExplanat_fd1_0_c3'>
							<text class='skillExplanat_fd1_0_c3_c0'>学习进度：</text>
							<text class='skillExplanat_fd1_0_c3_c1' v-if=" item.is_study=='1'">已学习</text><text
								class='skillExplanat_fd1_0_c3_c0' v-if=" item.is_study==0">未学习</text>
						</view>
					</view>
				</template>

			</view>

			<!---flex布局flex布局结束-->


		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"courseChapter": [],
				"freexianshangkecheng_id": "",
				"freexuexirenwu_id": ""
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				freexianshangkecheng_id,
				freexuexirenwu_id
			} = options
			if (freexianshangkecheng_id !== undefined) this.freexianshangkecheng_id = freexianshangkecheng_id
			if (freexuexirenwu_id !== undefined) this.freexuexirenwu_id = freexuexirenwu_id
			// // #ifdef MP-WEIXIN
			// uni.showShareMenu({
			// 	withShareTicket: true,
			// 	//设置下方的Menus菜单，才能够让发送给朋友与分享到朋友圈两个按钮可以点击
			// 	menus: ["shareAppMessage", "shareTimeline"]
			// })
			// // #endif
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.getCourseChapterFunc()
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {
			this.getCourseChapterFunc()
		},
		// onShareAppMessage() {
		// 	return {
		// 		title: '高整无忧-数字家政平台',
		// 		path: `/pages/wode/skillExplanat/skillExplanat?freexianshangkecheng_id=${item.freexianshangkecheng_id}&freexuexirenwu_id=${item.freexuexirenwu_id}`
		// 	}
		// },
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取课程章节
			async getCourseChapterFunc() {
				//请求方法
				//数据验证

				let datacourseChapter = await this.$api.get(global.apiUrls.post63d8d8a5e8762, {
					freexianshangkecheng_id: this.freexianshangkecheng_id
				});

				if (datacourseChapter.data.code != 1) {
					this.$message.info(datacourseChapter.data.msg);
					return
				}
				let infocourseChapter = datacourseChapter.data;
				this.courseChapter = infocourseChapter.data

			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #F8F8F8;
		background-size: 100% auto;
	}

	.skillExplanat_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.skillExplanat_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
	}

	.skillExplanat_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
		font-weight: 500;
	}

	.skillExplanat_fd0_0_c0 {
		width: 100rpx;
	}

	.skillExplanat_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.skillExplanat_flex_1 {
		padding: 24rpx 12rpx 0rpx 12rpx;
	}

	.skillExplanat_fd1_0_c3_c1 {
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(227, 29, 26, 1);
	}

	.skillExplanat_fd1_0_c3_c0 {
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(153, 153, 153, 1);
	}

	.skillExplanat_fd1_0_c3 {
		margin: 0rpx 24rpx 16rpx 24rpx;
	}

	.skillExplanat_fd1_0_c2_c0 {
		color: #333;
		font-size: 30rpx;
		font-weight: 500;
		line-height: 37rpx;
		-webkit-line-clamp: 2;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		height: 74rpx;
	}

	.skillExplanat_fd1_0_c2 {
		height: 80rpx;
		line-height: 40rpx;
		margin: 16rpx 24rpx 12rpx 24rpx;
	}

	.skillExplanat_fd1_0_c1 {
		width: 64rpx;
		height: 64rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		position: absolute;
		right: 148rpx;
		top: 150rpx;
	}

	.skillExplanat_fd1_0_c0 {
		width: 340rpx;
		height: 340rpx;
		border-radius: 16rpx 16rpx 0rpx 0rpx;
	}

	.skillExplanat_fd1_0 {
		background: #fff;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		box-shadow: 0rpx 6rpx 25rpx rgba(0, 0, 0, 0.1);
		margin: 0rpx 10rpx 24rpx 10rpx;
		position: relative;
		width: 340rpx;
	}
</style>